//
//  ZYCModifyDutyRecordDetailHeaderView.m
//  ZDSC
//
//  Created by ZDTX on 2021/8/6.
//

#import "ZYCModifyDutyRecordDetailHeaderView.h"
#import "ZYCDutyBulletionRecordDetailModel.h"

@interface ZYCModifyDutyRecordDetailHeaderView ()

@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *contentLabel;
@end
@implementation ZYCModifyDutyRecordDetailHeaderView

- (void)setModel:(ZYCDutyPlansRecordModel *)model{
    _model = model;
    _titleLabel.text = model.title;
    _contentLabel.text = [NSString stringWithFormat:@"值班人员:%@",model.dutyPersonnel];
    
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = HEX_RGB(kBgWhiteColor);
        
        [self addSubview:self.titleLabel];
        [self addSubview:self.contentLabel];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(15.5f);
            make.top.equalTo(self).offset(20.0f);
        }];
        [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.titleLabel.mas_bottom).offset(20.0f);
            make.left.equalTo(self).offset(15.5f);
            make.right.equalTo(self).offset(-15.5f);
            make.bottom.equalTo(self).offset(-20.0f);
        }];

    }
    return self;
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [UILabel LabelWithFont:kSystemBoldFont(17.0f) titleColor:HEX_RGB(@"#262A28") textAlignment:ZZTextAlignmentLeft];
    }
    return _titleLabel;
}

- (UILabel *)contentLabel {
    if (!_contentLabel) {
        _contentLabel = [UILabel LabelWithFont:kCustomFont(@"PingFangSC-Light", 14.0f) titleColor:HEX_RGB(@"#888888") textAlignment:ZZTextAlignmentLeft];
        _contentLabel.numberOfLines = 0;
    }
    return _contentLabel;
}

@end
